package com.wb.spring.boot.autoconfigure.model;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @Author wenbin.xu
 * @Date 2022/9/13 16:39
 */
@ConfigurationProperties(prefix = "wb")
public class WbProperties {
    /**
     * 是否启用
     */
    private boolean enabled;

    /**
     * 要检查的包路径
     */
    private String packageScan;

    /**
     * 服务名称
     */
    private String name;


    /**
     * 注册中心类型
     */
    private String registerType;

    /**
     * redis注册信息
     */
    private RedisRegister redisRegister;

    public static class RedisRegister {
        /**
         * redis地址
         */
        private String host;

        /**
         * 端口
         */
        private int port;

        /**
         * 密码
         */
        private String password;

        public String getHost() {
            return host;
        }

        public void setHost(String host) {
            this.host = host;
        }

        public int getPort() {
            return port;
        }

        public void setPort(int port) {
            this.port = port;
        }

        public String getPassword() {
            return password;
        }

        public void setPassword(String password) {
            this.password = password;
        }
    }

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public String getPackageScan() {
        return packageScan;
    }

    public void setPackageScan(String packageScan) {
        this.packageScan = packageScan;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public RedisRegister getRedisRegister() {
        return redisRegister;
    }

    public void setRedisRegister(RedisRegister redisRegister) {
        this.redisRegister = redisRegister;
    }

    public String getRegisterType() {
        return registerType;
    }

    public void setRegisterType(String registerType) {
        this.registerType = registerType;
    }
}
